<?php
require_once(ROOT."/classes/rss.class.php");
//lấy content
$rss = new rss(SITENAME,DOMAIN);
//Cac dt
$list_products = db_array('SELECT pro_id,pro_name,pro_alias,pro_type,pro_image,pro_details
                              FROM products
                              WHERE pro_active = 1 AND pro_type = 1
                              ORDER BY pro_id DESC
                              LIMIT 20');
foreach($list_products as $product) {
   $name = $product['pro_name'];
   $url = DOMAIN.url_product_detail($product);
   $image = DOMAIN.$product['pro_image'];
   $summary = cut_string(removeHTML($product['pro_details']),175);
   $description = '<div align="center">
                     <a href="'.$url.'">
                        <img width="200" src="'.$image.'" />
                     </a>
                  </div>
                  <br />abc'.$summary;
    $rss->additem($name,$description,$url,$url,date('d/m/Y h:i:s a'));
}
//Cac dich vu
$list_services = db_array('SELECT ser_name,ser_alias,ser_image,ser_details
                           FROM services
                           WHERE ser_active = 1
                           ORDER BY ser_id DESC
                           LIMIT 20');
foreach($list_services as $service) {
   $name = $service['ser_name'];
   $url = DOMAIN.url_services_detail($service);
   $image = DOMAIN.$service['ser_image'];
   $summary = cut_string(removeHTML($service['ser_details']),175);
   $description = '<div align="center">
                     <a href="'.$url.'">
                        <img width="200" src="'.$image.'" />
                     </a>
                  </div>
                  <br />abc'.$summary;
    $rss->additem($name,$description,$url,$url,date('d/m/Y h:i:s a'));
}
?>
<?header ("Content-Type:text/xml");?>
<?=$rss->getRSSContent()?>